import gym
import time

env = gym.make('Blackjack-v1', natural=False, sab=True,render_mode="human",player_hit_scroe=16)
total_score = 0
## 玩10局
for episode in range(1,10):
    done = False
    env.reset()
    score = 0
    while not done:
        env.render()
        action = env.action_space.sample()
        obs,reward,done,info,_ = env.step(action) 
        print(f'episode: {episode},action: {action} 玩家手中牌：{obs[0]}, 庄家手中牌：{obs[1]},得分: {reward}')
        score+=reward
        time.sleep(2)
    total_score+=score

print(f'总得分: {total_score}')

